import req from "../../utils/request";
import qs from "qs";
//获取验证码图片
export function get_loginPic(query) {
  return req({
    url: "/getPic",
    method: "get",
    params: query,
  });
}
//验证图片
export function checkcapcode(query) {
  return req({
    url: "/checkcapcode",
    method: "get",
    params: query,
  });
}

//登录
export function userLogin(data) {
  return req({
    url: "/login",
    method: "post",
    data,
  });
}
//退出登录
export function userLogout(data) {
  return req({
    url: "/logout",
    method: "get",
    data,
  });
}
//获取角色对应菜单
export function getUserMenu(query) {
  return req({
    url: "/api/getUserMenuList",
    method: "get",
    params: query,
  });
}
//录入添加菜单
export function menuAdd(query) {
  return req({
    url: "/api/menuAdd",
    method: "put",
    data: query,
  });
}
// export const upload = (method, url, params) => {
//     return req({
//         method: method,
//         url: baseUrl+url,
//         headers: {
//             'Content-Type': 'multipart/form-data'
//         },
//         data: params
//     }).then(res => res.data)
// }


//   //获取所有得用户列表
//   export function get_user_list(query) {
//     return req({
//       url: "/system/user/list",
//       method: "get",
//       params: query,
//     });
//   }